package C;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringJoiner;

public class C20 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nums = Arrays.stream(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        System.out.println(getResult(nums));
    }

    public static String getResult(int[] nums) {
        StringJoiner sj = new StringJoiner(" ");
        if (nums.length == 4) {
            for (int i=0;i<nums.length;i++) {
                sj.add(String.valueOf(nums[i]));
            }
            return sj.toString();
        }
        for (int i=0;i<nums.length;i+=2) {
            int x = nums[i],y = nums[i+1];
            if (i == 0) {
                sj.add(String.valueOf(x)).add(String.valueOf(y));
            } else if (i == 2) {
                continue;
            } else {
                int xPre = nums[i-2],yPre = nums[i-1];
                int xPrePre = nums[i-4],yPrePre = nums[i-3];
                if (xPre-xPrePre == x-xPre && yPre-yPrePre == y-yPre) {
                    continue;
                } else {
                    sj.add(String.valueOf(xPre)).add(String.valueOf(yPre));
                    if (i == nums.length-2) {
                        sj.add(String.valueOf(x)).add(String.valueOf(y));
                    }
                }
            }
        }
        return sj.toString();
    }
}
